<template>
	<view class="mainbgc">
		<header-top :messageInfo="{typeFlag:true,message:'详情'}"></header-top>
		<view class="ffffff mainpadding_top">
			<view class="title">{{dataAll.title}}</view>
			<view class="content margin_top">{{dataAll.content}}</view>
			<view class="newstime">{{dataAll.seetime | formatDate('-')}}</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid:"",
				dataAll:{
					content: "4",
					createtime: 1671522233,
					id: 1,
					seetime: 1674107605,
					staff_id: 10,
					status: "2",
					title: "4",
					type: "1",
				}
			}
		},
		filters: {
			// 时间戳处理
			formatDate: function(value, spe = '/') {
				value = value * 1000
				let data = new Date(value);
				let year = data.getFullYear();
				let month = data.getMonth() + 1;
				let day = data.getDate();
				let h = data.getHours();
				let mm = data.getMinutes();
				let s = data.getSeconds();
				month = month >= 10 ? month : "0" + month;
				day = day >= 10 ? day : "0" + day;
				h = h >= 10 ? h : "0" + h;
				mm = mm >= 10 ? mm : "0" + mm;
				s = s >= 10 ? s : "0" + s;
				return `${year}${spe}${month}${spe}${day}`;
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.init()
		},
		methods: {
			init(){
				httpRequest.request('appapi/staff/index/messagesee', 'POST', {
					id:this.listid
				}).then(res => {
					this.dataAll = res.data.list
				})
			}
		}
	}
</script>

<style scoped>
	.title{
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #000000;
		text-align: center;
	}
	.content{
		text-indent: 48rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #000000;
		min-height: 100rpx;
	}
	.newstime{
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #666;
		text-align: right;
	}
</style>
